package com.house365.core.activity;

import android.content.Intent;
import android.view.KeyEvent;

import com.house365.core.anim.AnimBean;
import com.house365.core.anim.AnimCommon;

/**
 *@author py
 *@date 2012-7-23
 *@comment
 */
public abstract class BaseMenuActivity extends BaseCommonActivity {

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
			return false;
		}
		return super.onKeyDown(keyCode, event);
	}

	@Override
	public void startActivity(Intent intent) {
		super.startActivity(intent);
		AnimBean animBean = getStartAnim();
		if(animBean!= null && animBean.getIn()>0 && animBean.getOut()>0){
			AnimCommon.set(animBean.getIn(),animBean.getOut());
		}
	}
	@Override
	public void startActivityForResult(Intent intent, int requestCode) {
		// TODO Auto-generated method stub
		super.startActivityForResult(intent, requestCode);
		AnimBean animBean = getStartAnim();
		if(animBean!= null && animBean.getIn()>0 && animBean.getOut()>0){
			AnimCommon.set(animBean.getIn(),animBean.getOut());
		}
	}
	
}
